<?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Depart;

class DepartController extends Controller
{
    public function getList(Request $request)
    {
    	$rs['status'] = false;
        $where['cate_id'] = (int)$request->cate_id;
        $list = Depart::where($where)->select(['id','name','store_num','out_price'])->get();
        if($list) {
            $rs['status'] = true;
            $rs['data'] = $list;
            return response()->json($rs);
        }
        return response()->json($rs);
    }
}
